{% extends 'base.html' %}
{% block lis-main %}
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-3 col-md-2 sidebar">
                <ul class="nav nav-sidebar">
                    <li><a href="/lis_cls/">班级列表</a></li>
                    <li class="active"><a href="/lis_stu/">学生列表</a></li>
                    <li><a href="/lis_tec/">教师列表</a></li>
                </ul>

            </div>
            <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
                <h1 class="page-header">编辑学员</h1>

                <div class="panel panel-success">
                    <div class="panel-body">
                        <div class="form-horizontal">
                            <form action="/edit_stu/" method="post">
                                <div class="form-group">
                                    <div class="col-sm-5">
                                        <input type="text" name="id" value="{{ e_s.id }}" style="display: none">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="s_name" class="col-sm-2 control-label">学员姓名</label>
                                    <div class="col-sm-5">
                                        <input type="text" class="form-control" id="s_name" name="s_name"
                                               value="{{ e_s.name }}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="s1" class="col-sm-2 control-label">班级</label>
                                    <div class="col-sm-5">
                                        <select name="edit_cls" class="form-control" id="s1">
                                            {% for c in c_list %}
                                                {% if c.id == e_s.class1.id %}
                                                    <option value="{{ c.id }}" selected>{{ c.name }}</option>
                                                {% else %}
                                                    <option value="{{ c.id }}">{{ c.name }}</option>
                                                {% endif %}
                                            {% endfor %}
                                        </select>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-2">
                                        <button type="submit" class="btn btn-success">提交</button>
                                    </div>
                                </div>
                            </form>
                        </div>

                    </div>
                </div>

            </div>
        </div>
    </div>
{% endblock %}